package view.component;

import view.helper.CardHolder;

public class PileComponent extends CardHolder {	
	
	Integer top, left, step;		
	
	public PileComponent() {
		setTopHolder(this);
		setDroppable("true"); 				
	}	
	
	public void drawAtPosition(Integer top, Integer left) {
		super.drawAtPosition(top, left);		
		this.top = top;
		this.left = left;				
		lastCard.draw();
	}
	
	public CardHolder getTopHolder() {
		return topHolder;
	}
		
	public void setStep(Integer step) {
		this.step = step;
	}	
	
	public Integer getStep(CardComponent card) {
		if (card.equals(lastCard)) {
			return 0;
		} else {
			return step;
		}		
	}	
	
}
